<template>
    <header id='head_top'>
        <slot name='logo'></slot>
        <slot name='search'></slot>
        <section class="head_goback" v-if="goBack" @click="$router.go(-1)">
            <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" version="1.1">
                <!-- <polyline points="12,18 4,9 12,0" style="fill:none;stroke:rgb(255,255,255);stroke-width:2"/> -->
                 <polyline points="12,18 4,9 12,0" style="fill:none;stroke:rgb(0 0 0);stroke-width:2"/>
            </svg>
        </section>

        <section class="title_head ellipsis" v-if="headTitle">
            <span class="title_text">{{headTitle}}</span>
        </section>
        <slot name="edit"></slot>
        <slot name="msite-title"></slot>
        <slot name="changecity"></slot>
        <slot name="changeLogin"></slot>
    </header>
</template>

<script>
// import {mapState, mapActions} from 'vuex'
export default {
  data () {
    return {

    }
  },
  mounted () {
  },
  props: ['signinUp', 'headTitle', 'goBack'],
  computed: {
  },
  methods: {
    GoBack () {
      this.$emit('GoBack')
    }
  }

}

</script>

<style scoped>

#head_top{
    /* background-color: #407cff; */
    /* background-color:  #FFFFFF ; */
    /* background-image: linear-gradient( 80deg, #3768ff , #55adff); */
    background-image: linear-gradient( 80deg, #FFFFFF);
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width:100%;
    height: 1rem;
}
.head_goback{
    width: 0.3rem;
    height: 0.5rem;
    /* left: 0.2rem; */
    line-height: 1rem;
    margin-left: .2rem;
}
.login_span{
    color: #fff;
}
.user_avatar{
    fill: #fff;
    width: 0.25rem;
    height: 0.25rem;
}
.title_head{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    color: #fff;
    text-align: center;
}
    .title_text{
        text-align: center;
        font-size: 0.3rem;
        display: inherit;
        /* color: #fff; */
        color: #333333;
        font-weight: bold;
        line-height: 1rem;
        display: -webkit-box;/*作为弹性伸缩盒子模型显示*/
        -webkit-line-clamp: 1; /*显示的行数；如果要设置2行加...则设置为2*/
        overflow: hidden; /*超出的文本隐藏*/
        text-overflow: ellipsis; /* 溢出用省略号*/
        -webkit-box-orient: vertical;/*伸缩盒子的子元素排列：从上到下*/
    }
</style>
